import React from 'react';
import {
    View,
    Text,
    Image,
    TouchableOpacity,
} from 'react-native';
import NavigationUtil from "../../navigator/NavigationUtil";
import Entypo from "react-native-vector-icons/Entypo";
import {Heading1} from '../../public/widget/text';
import styles from './style/browseItem';
import {BaseUrl} from '../../public/dao/DataStore';
export default class BrowseItem extends React.Component {
    render() {
        const {infoDatas} = this.props;
        let items = infoDatas.item ? infoDatas.item:{};
        return (
        <TouchableOpacity onPress={()=>{
            NavigationUtil.goPage({...infoDatas},'LoanDetail')
        }}>
            {/* <View style={styles.ViewItem}>
                <View>
                    <View style={styles.imgView}>
                        <Image style={styles.image} resizeMode={"contain"} source={{uri:BaseUrl+'/'+items.image_url}}/>
                        <View><Text style={styles.textH1}>{items.name}</Text></View>
                        <View><Text style={styles.textContent}>额度{items.scope}</Text></View>
                        <View><Text style={styles.textContent}>{items.interest_rate}</Text></View>
                    </View>
                    <View style={styles.dotList}>
                        <Entypo
                            name={'dot-single'}
                            size={20}
                        />
                        <Text numberOfLines={1} style={styles.bottomFont}>浏览日期: {items.ts_browsing}</Text>
                    </View>
                </View>
            </View> */}
            <View style={styles.dotList}>
                <Entypo
                    name={'dot-single'}
                    size={20}
                />
                <Text numberOfLines={1} style={styles.bottomFont}>浏览日期: {items.ts_browsing}</Text>
            </View>
            <View style={styles.itemsview}>
            <View>
                <View style={styles.leftitemsTop}>
                    <Image style={styles.itemsImage} source={{uri:BaseUrl+'/'+items.image_url}}/>
                    <View>
                        <Text style={styles.itemstoptext}>{items.name}</Text>
                        <Text style={styles.itemstoptexts}>放款时间:{items.lend_time}</Text>
                    </View>
                </View>
                <Text style={styles.numText}>{items.max_amount}</Text>
                <Text>最高额度（元）</Text>
            </View>
            <View style={styles.itemsRight}>
                <Text style={styles.rightText}>日利率{items.interest_rate}</Text>
                <Text numberOfLines={1} style={{width:100}}>{items.repay_term}</Text>
            </View>
          </View>
        </TouchableOpacity>)
    }
}
